Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated the deepcopy method, using pythons native marshal command #2390

Closed
wants to merge 1 commit into from

Conversation

Samsonboadi
Copy link
Contributor

@Samsonboadi Samsonboadi commented Jun 1, 2023

Fixes #2334

Description

updated the deepcopy method from torch.save, to using pythons native marshal command

Checklist

cc @albanD

@netlify
Copy link

netlify bot commented Jun 1, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit 71740ad
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/647893bec9d0a1000861eeb2
😎 Deploy Preview https://deploy-preview-2390--pytorch-tutorials-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added core Tutorials of any level of difficulty related to the core pytorch functionality docathon-h1-2023 A label for the docathon in H1 2023 easy and removed cla signed labels Jun 1, 2023
Copy link
Member

@kit1980 kit1980 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is what #2177 is asking for.
We should not use marshaling.

For this case torch.save is not needed, because the model is already loaded from disk.
Just duplicate "Load Pretrained Model" steps from lines after 163 for model_to_quantize - and there will be a copy.

@Samsonboadi Samsonboadi requested a review from kit1980 June 2, 2023 13:49
@Samsonboadi
Copy link
Contributor Author

i have made a new pull request with the right update

@svekars
Copy link
Contributor

svekars commented Jun 2, 2023

@Samsonboadi please close all redundant pull requests.

@Samsonboadi Samsonboadi closed this Jun 2, 2023
@Samsonboadi Samsonboadi reopened this Jun 2, 2023
@Samsonboadi Samsonboadi closed this Jun 2, 2023
@Samsonboadi Samsonboadi deleted the deepcopy_using_marshal branch June 2, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed core Tutorials of any level of difficulty related to the core pytorch functionality docathon-h1-2023 A label for the docathon in H1 2023 easy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update tutorial to avoid use of copy.deepcopy()-FX Graph Mode Post Training Dynamic Quantization
4 participants